package com.gzhryc.socket.mosquitto.log;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.gzhryc.socket.SocketCallback;
import com.gzhryc.socket.SocketNode;

public class DefaultHandler extends MosquittoLogHandler{

	public DefaultHandler(MosquittoLogHandler nextHandler,SocketNode node,SocketCallback callback) {
		super(nextHandler,node,callback);
	}

	Pattern part1 = Pattern.compile("Received PINGREQ from.*");
	Pattern part2 = Pattern.compile("Sending PINGRESP to.*");
	
	public boolean execute(String logStr) {
		Matcher mat = part1.matcher(logStr);
		if(!mat.find()){
			mat = part2.matcher(logStr);
			if(!mat.find()){
				//数据发送
			}
		}
		return true;
	}

}
